<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
    <title>Reference</title>
    <link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>

<div id="container">

<div id="product">
	<div id="product_logo"></div>
	<div id="product_name"><big><b></b></big></div>
	<div id="product_description"></div>
</div> <!-- id="product" -->


<div id="main">


<!-- Menu -->

<div id="navigation">
<br/>
<h1>Duplex</h1>

<ul>
  <li><a href="../index.html">Index</a></li>
</ul>

<h2>Contents</h2>
<ul>
<li><a href="#Functions">Functions</a></li>
<li><a href="#Fields">Fields</a></li>
</ul>


<h2>Modules</h2>
<ul class="$(kind=='Topics' and '' or 'nowrap'">
  <li><a href="../modules/Duplex.Application.html">Duplex.Application</a></li>
  <li><a href="../modules/Duplex.Applications.Effect.html">Duplex.Applications.Effect</a></li>
  <li><a href="../modules/Duplex.Applications.GridPie.html">Duplex.Applications.GridPie</a></li>
  <li><a href="../modules/Duplex.Applications.Hydra.html">Duplex.Applications.Hydra</a></li>
  <li><a href="../modules/Duplex.Applications.Instrument.html">Duplex.Applications.Instrument</a></li>
  <li><a href="../modules/Duplex.Applications.Keyboard.GridLayout.html">Duplex.Applications.Keyboard.GridLayout</a></li>
  <li><a href="../modules/Duplex.Applications.Keyboard.Layouts.HarmonicLayout.html">Duplex.Applications.Keyboard.Layouts.HarmonicLayout</a></li>
  <li><a href="../modules/Duplex.Applications.Keyboard.Layouts.IsomorphicLayout.html">Duplex.Applications.Keyboard.Layouts.IsomorphicLayout</a></li>
  <li><a href="../modules/Duplex.Applications.Keyboard.Layouts.PianoLayout.html">Duplex.Applications.Keyboard.Layouts.PianoLayout</a></li>
  <li><a href="../modules/Duplex.Applications.Keyboard.html">Duplex.Applications.Keyboard</a></li>
  <li><a href="../modules/Duplex.Applications.Matrix.html">Duplex.Applications.Matrix</a></li>
  <li><a href="../modules/Duplex.Applications.Metronome.html">Duplex.Applications.Metronome</a></li>
  <li><a href="../modules/Duplex.Applications.MidiActions.Bindings.html">Duplex.Applications.MidiActions.Bindings</a></li>
  <li><a href="../modules/Duplex.Applications.MidiActions.html">Duplex.Applications.MidiActions</a></li>
  <li><a href="../modules/Duplex.Applications.Mixer.html">Duplex.Applications.Mixer</a></li>
  <li><a href="../modules/Duplex.Applications.Mlrx.Mlrx_group.html">Duplex.Applications.Mlrx.Mlrx_group</a></li>
  <li><a href="../modules/Duplex.Applications.Mlrx.Mlrx_note.html">Duplex.Applications.Mlrx.Mlrx_note</a></li>
  <li><a href="../modules/Duplex.Applications.Mlrx.Mlrx_pos.html">Duplex.Applications.Mlrx.Mlrx_pos</a></li>
  <li><a href="../modules/Duplex.Applications.Mlrx.Mlrx_track.html">Duplex.Applications.Mlrx.Mlrx_track</a></li>
  <li><a href="../modules/Duplex.Applications.Mlrx.html">Duplex.Applications.Mlrx</a></li>
  <li><strong>Duplex.Applications.Navigator</strong></li>
  <li><a href="../modules/Duplex.Applications.NotesOnWheels.html">Duplex.Applications.NotesOnWheels</a></li>
  <li><a href="../modules/Duplex.Applications.PatternCursor.html">Duplex.Applications.PatternCursor</a></li>
  <li><a href="../modules/Duplex.Applications.PatternSequence.html">Duplex.Applications.PatternSequence</a></li>
  <li><a href="../modules/Duplex.Applications.Recorder.html">Duplex.Applications.Recorder</a></li>
  <li><a href="../modules/Duplex.Applications.Repeater.html">Duplex.Applications.Repeater</a></li>
  <li><a href="../modules/Duplex.Applications.Rotate.html">Duplex.Applications.Rotate</a></li>
  <li><a href="../modules/Duplex.Applications.StepSequencer.html">Duplex.Applications.StepSequencer</a></li>
  <li><a href="../modules/Duplex.Applications.SwitchConfiguration.html">Duplex.Applications.SwitchConfiguration</a></li>
  <li><a href="../modules/Duplex.Applications.TestPad.html">Duplex.Applications.TestPad</a></li>
  <li><a href="../modules/Duplex.Applications.TrackSelector.html">Duplex.Applications.TrackSelector</a></li>
  <li><a href="../modules/Duplex.Applications.Transport.html">Duplex.Applications.Transport</a></li>
  <li><a href="../modules/Duplex.Applications.UIButtonTest.html">Duplex.Applications.UIButtonTest</a></li>
  <li><a href="../modules/Duplex.Applications.XYPad.html">Duplex.Applications.XYPad</a></li>
  <li><a href="../modules/Duplex.Automation.html">Duplex.Automation</a></li>
  <li><a href="../modules/Duplex.Browser.html">Duplex.Browser</a></li>
  <li><a href="../modules/Duplex.BrowserProcess.html">Duplex.BrowserProcess</a></li>
  <li><a href="../modules/Duplex.Canvas.html">Duplex.Canvas</a></li>
  <li><a href="../modules/Duplex.CanvasPoint.html">Duplex.CanvasPoint</a></li>
  <li><a href="../modules/Duplex.ControlMap.html">Duplex.ControlMap</a></li>
  <li><a href="../modules/Duplex.Device.html">Duplex.Device</a></li>
  <li><a href="../modules/Duplex.Display.html">Duplex.Display</a></li>
  <li><a href="../modules/Duplex.Globals.html">Duplex.Globals</a></li>
  <li><a href="../modules/Duplex.Message.html">Duplex.Message</a></li>
  <li><a href="../modules/Duplex.MessageStream.html">Duplex.MessageStream</a></li>
  <li><a href="../modules/Duplex.MidiDevice.html">Duplex.MidiDevice</a></li>
  <li><a href="../modules/Duplex.OscClient.html">Duplex.OscClient</a></li>
  <li><a href="../modules/Duplex.OscDevice.html">Duplex.OscDevice</a></li>
  <li><a href="../modules/Duplex.OscVoiceMgr.html">Duplex.OscVoiceMgr</a></li>
  <li><a href="../modules/Duplex.Preferences.html">Duplex.Preferences</a></li>
  <li><a href="../modules/Duplex.ProcessSlicer.html">Duplex.ProcessSlicer</a></li>
  <li><a href="../modules/Duplex.RoamingDSP.html">Duplex.RoamingDSP</a></li>
  <li><a href="../modules/Duplex.Scheduler.html">Duplex.Scheduler</a></li>
  <li><a href="../modules/Duplex.StateController.html">Duplex.StateController</a></li>
  <li><a href="../modules/Duplex.UIButton.html">Duplex.UIButton</a></li>
  <li><a href="../modules/Duplex.UIButtonStrip.html">Duplex.UIButtonStrip</a></li>
  <li><a href="../modules/Duplex.UIComponent.html">Duplex.UIComponent</a></li>
  <li><a href="../modules/Duplex.UIKey.html">Duplex.UIKey</a></li>
  <li><a href="../modules/Duplex.UIKeyPressure.html">Duplex.UIKeyPressure</a></li>
  <li><a href="../modules/Duplex.UILabel.html">Duplex.UILabel</a></li>
  <li><a href="../modules/Duplex.UIPad.html">Duplex.UIPad</a></li>
  <li><a href="../modules/Duplex.UIPitchBend.html">Duplex.UIPitchBend</a></li>
  <li><a href="../modules/Duplex.UISlider.html">Duplex.UISlider</a></li>
  <li><a href="../modules/Duplex.UISpinner.html">Duplex.UISpinner</a></li>
  <li><a href="../modules/Duplex.WidgetHooks.html">Duplex.WidgetHooks</a></li>
  <li><a href="../modules/Duplex.WidgetKeyboard.html">Duplex.WidgetKeyboard</a></li>
  <li><a href="../modules/Duplex.html">Duplex</a></li>
  <li><a href="../modules/main.html">main</a></li>
</ul>

</div>

<div id="content">

<h1>Module <code>Duplex.Applications.Navigator</code></h1>
<p>The "Navigator" application allows you to take control of the pattern/block-loop and playback position.</p>
<p>
<p>
Inheritance: <a href="../modules/Duplex.Application.html#">Duplex.Application</a> > Duplex.Application.Navigator </p>

<h3>Usage</h3>

<ul>
    <li>Single press &amp; release to move playback to the indicated position</li>
    <li>When stopped, press &amp; release will cause the edit-pos to move </li>
    <li>Pressing two buttons will create a block-loop with that approximate size</li>
    <li>When a loop has been created, hold any button to cleared it again</li>
</ul>

<h3>Suggested configuration</h3>

<p>To take advantage of this application, you need to assign a number of buttons to the "blockpos" - the more buttons, the higher precision you will get. Generally speaking, you want to map either 4, 8 or 16 buttons for music which is based on a 4/4 measure. </p>

<h3>Changes</h3>

<p>  0.98.32</p>
<pre><code>- FIXME When jumping back in pattern, and briefly going to the previous pattern,
  the navigator would break if the previous pattern hadn’t same number of lines
</code></pre>

<p>  0.98.27</p>
<pre><code>- Should be more solid and support off-pattern updates
- New mappings: “prev_block”,”next_block”
</code></pre>

<p>  0.98.21</p>
<pre><code>- Fixed: issue when loading a new song while Navigator was displaying nothing
 (playback happening in a different pattern)
</code></pre>

<p>  0.98</p>
<pre><code>- Reset on new song
- Listen for changes to block-loop size
- Follow block loop enable
</code></pre>

<p>  0.96</p>
<pre><code>- Fixed: holding button while playback is stopped cause error
</code></pre>

<p>  0.95</p>
<pre><code>- Interactively control the blockloop position and size
</code></pre>

<p>  0.9</p>
<pre><code>- First release
</code></pre>

</p>


<h2><a href="#Functions">Functions</a></h2>
<table class="function_list">
	<tr>
	<td class="name" nowrap><a href="#__init">__init (VarArg)</a></td>
	<td class="summary">Constructor method</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#start_app">start_app ()</a></td>
	<td class="summary">inherited from Application</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#on_new_document">on_new_document ()</a></td>
	<td class="summary">inherited from Application</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#_build_app">_build_app ()</a></td>
	<td class="summary">inherited from Application</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#_update_blockpos_range">_update_blockpos_range ()</a></td>
	<td class="summary">update the looped range of the blockpos control</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#on_idle">on_idle ()</a></td>
	<td class="summary">inherited from Application</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#_obtain_active_index">_obtain_active_index ()</a></td>
	<td class="summary">obtain the current play/editpos, quantized to the number of steps</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#_get_index_from_line">_get_index_from_line (line)</a></td>
	<td class="summary">calculate the control index from the provided line
 using the selected pattern as the basis for the calculation</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#_get_line_from_index">_get_line_from_index (idx)</a></td>
	<td class="summary">return the line number for the provided index</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#_get_lines_per_unit">_get_lines_per_unit (seq_idx)</a></td>
	<td class="summary">obtain the number of lines per "unit" (blockpos size)
 using the selected pattern as the basis for the calculation</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#_is_inside_pattern">_is_inside_pattern ()</a></td>
	<td class="summary">check if edit-pos and play-pos is the same?</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#_jump_to_index">_jump_to_index (ctrl_idx)</a></td>
	<td class="summary">navigate to the line indicated by the index¨
 also: carry over loop, if this option has been enabled</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#_set_looped_range">_set_looped_range ()</a></td>
	<td class="summary">set the looped range using controller input
 also: maintain the pattern selection, if this feature has been enabled</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#_clear_looped_range">_clear_looped_range ()</a></td>
	<td class="summary">clear the looped range using controller input
 if you clear a block loop, the sequence loop should remain unaffected</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#_has_looped_range">_has_looped_range ()</a></td>
	<td class="summary">determine if the song contain a looped range
 (this can be a sequence loop, a block loop or a custom looped range)</td>
	</tr>
</table>
<h2><a href="#Fields">Fields</a></h2>
<table class="function_list">
	<tr>
	<td class="name" nowrap><a href="#self._active_index">self._active_index</a></td>
	<td class="summary">(int), the current control index as determined by the playback
 position within the pattern, quantized against the number of steps
 Note: a value of 0 means "no index is selected"</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#self._edit_line">self._edit_line</a></td>
	<td class="summary">(int), the current line in the edited pattern</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#self._blockpos_size">self._blockpos_size</a></td>
	<td class="summary">(int), the size of the blockpos control in units</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#self._index_update_requested">self._index_update_requested</a></td>
	<td class="summary">bool, true when we need to update the blockpos index</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#self._range_update_requested">self._range_update_requested</a></td>
	<td class="summary">bool, true when we need to update the blockpos range</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#self._loop_mode">self._loop_mode</a></td>
	<td class="summary">enum, one of the LOOP_xxx constants</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#self._loop_start">self._loop_start</a></td>
	<td class="summary">renoise.SongPos, where the loop starts</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#self._loop_end">self._loop_end</a></td>
	<td class="summary">renoise.SongPos, where the loop ends</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#self._jump_pos">self._jump_pos</a></td>
	<td class="summary">renoise.SongPos, disallow multiple playback_pos jumps</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#self._first_pos">self._first_pos</a></td>
	<td class="summary">renoise.SongPos, the first pressed button</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#self._first_idx">self._first_idx</a></td>
	<td class="summary">(int), the first pressed index</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#self._second_pos">self._second_pos</a></td>
	<td class="summary">renoise.SongPos, the second pressed button</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#self._held_event_fired">self._held_event_fired</a></td>
	<td class="summary">bool, true once the blockpos hold event has fired</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#self._prev_block">self._prev_block</a></td>
	<td class="summary">UIComponents</td>
	</tr>
</table>

<br/>
<br/>


    <h2><a name="Functions"></a>Functions</h2>
    <dl class="function">
    <dt>
    <a name = "__init"></a>
    <strong>__init (VarArg)</strong>
    </dt>
    <dd>
    Constructor method


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">VarArg</span>
        ),
        </li>
    </ul>



    <h3>See also:</h3>
    <ul>
         <a href="../modules/Duplex.Application.html#">Duplex.Application</a>
    </ul>


</dd>
    <dt>
    <a name = "start_app"></a>
    <strong>start_app ()</strong>
    </dt>
    <dd>
    inherited from Application



    <h3>Returns:</h3>
    <ol>

        bool or nil
    </ol>


    <h3>See also:</h3>
    <ul>
         <a href="../modules/Duplex.Application.html#start_app">Duplex.Application.start_app</a>
    </ul>


</dd>
    <dt>
    <a name = "on_new_document"></a>
    <strong>on_new_document ()</strong>
    </dt>
    <dd>
    inherited from Application





    <h3>See also:</h3>
    <ul>
         <a href="../modules/Duplex.Application.html#on_new_document">Duplex.Application.on_new_document</a>
    </ul>


</dd>
    <dt>
    <a name = "_build_app"></a>
    <strong>_build_app ()</strong>
    </dt>
    <dd>
    inherited from Application



    <h3>Returns:</h3>
    <ol>

        bool
    </ol>


    <h3>See also:</h3>
    <ul>
         <a href="../modules/Duplex.Application.html#_build_app">Duplex.Application._build_app</a>
    </ul>


</dd>
    <dt>
    <a name = "_update_blockpos_range"></a>
    <strong>_update_blockpos_range ()</strong>
    </dt>
    <dd>
    update the looped range of the blockpos control







</dd>
    <dt>
    <a name = "on_idle"></a>
    <strong>on_idle ()</strong>
    </dt>
    <dd>
    inherited from Application





    <h3>See also:</h3>
    <ul>
         <a href="../modules/Duplex.Application.html#on_idle">Duplex.Application.on_idle</a>
    </ul>


</dd>
    <dt>
    <a name = "_obtain_active_index"></a>
    <strong>_obtain_active_index ()</strong>
    </dt>
    <dd>
    obtain the current play/editpos, quantized to the number of steps



    <h3>Returns:</h3>
    <ol>

        int (0 to display "no index")
    </ol>




</dd>
    <dt>
    <a name = "_get_index_from_line"></a>
    <strong>_get_index_from_line (line)</strong>
    </dt>
    <dd>
    calculate the control index from the provided line
 using the selected pattern as the basis for the calculation


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">line</span>



        </li>
    </ul>





</dd>
    <dt>
    <a name = "_get_line_from_index"></a>
    <strong>_get_line_from_index (idx)</strong>
    </dt>
    <dd>
    return the line number for the provided index


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">idx</span>
         (int), 0-blockpos_size
        </li>
    </ul>

    <h3>Returns:</h3>
    <ol>

        int (0-number of lines)
    </ol>




</dd>
    <dt>
    <a name = "_get_lines_per_unit"></a>
    <strong>_get_lines_per_unit (seq_idx)</strong>
    </dt>
    <dd>
    obtain the number of lines per "unit" (blockpos size)
 using the selected pattern as the basis for the calculation


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">seq_idx</span>
         (int)
        </li>
    </ul>

    <h3>Returns:</h3>
    <ol>

        int (lines per unit), number of lines in pattern
    </ol>




</dd>
    <dt>
    <a name = "_is_inside_pattern"></a>
    <strong>_is_inside_pattern ()</strong>
    </dt>
    <dd>
    check if edit-pos and play-pos is the same? <br/>
 note: when not playing, this will always return true







</dd>
    <dt>
    <a name = "_jump_to_index"></a>
    <strong>_jump_to_index (ctrl_idx)</strong>
    </dt>
    <dd>
    navigate to the line indicated by the index¨
 also: carry over loop, if this option has been enabled


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">ctrl_idx</span>
         (int), 1-blockpos_size
        </li>
    </ul>





</dd>
    <dt>
    <a name = "_set_looped_range"></a>
    <strong>_set_looped_range ()</strong>
    </dt>
    <dd>
    set the looped range using controller input
 also: maintain the pattern selection, if this feature has been enabled







</dd>
    <dt>
    <a name = "_clear_looped_range"></a>
    <strong>_clear_looped_range ()</strong>
    </dt>
    <dd>
    clear the looped range using controller input
 if you clear a block loop, the sequence loop should remain unaffected







</dd>
    <dt>
    <a name = "_has_looped_range"></a>
    <strong>_has_looped_range ()</strong>
    </dt>
    <dd>
    determine if the song contain a looped range
 (this can be a sequence loop, a block loop or a custom looped range)



    <h3>Returns:</h3>
    <ol>

        bool, enum (Navigator.LOOP_xxx)
    </ol>




</dd>
</dl>
    <h2><a name="Fields"></a>Fields</h2>
    <dl class="function">
    <dt>
    <a name = "self._active_index"></a>
    <strong>self._active_index</strong>
    </dt>
    <dd>
    (int), the current control index as determined by the playback
 position within the pattern, quantized against the number of steps
 Note: a value of 0 means "no index is selected"







</dd>
    <dt>
    <a name = "self._edit_line"></a>
    <strong>self._edit_line</strong>
    </dt>
    <dd>
    (int), the current line in the edited pattern







</dd>
    <dt>
    <a name = "self._blockpos_size"></a>
    <strong>self._blockpos_size</strong>
    </dt>
    <dd>
    (int), the size of the blockpos control in units







</dd>
    <dt>
    <a name = "self._index_update_requested"></a>
    <strong>self._index_update_requested</strong>
    </dt>
    <dd>
    bool, true when we need to update the blockpos index







</dd>
    <dt>
    <a name = "self._range_update_requested"></a>
    <strong>self._range_update_requested</strong>
    </dt>
    <dd>
    bool, true when we need to update the blockpos range







</dd>
    <dt>
    <a name = "self._loop_mode"></a>
    <strong>self._loop_mode</strong>
    </dt>
    <dd>
    enum, one of the LOOP_xxx constants







</dd>
    <dt>
    <a name = "self._loop_start"></a>
    <strong>self._loop_start</strong>
    </dt>
    <dd>
    renoise.SongPos, where the loop starts







</dd>
    <dt>
    <a name = "self._loop_end"></a>
    <strong>self._loop_end</strong>
    </dt>
    <dd>
    renoise.SongPos, where the loop ends







</dd>
    <dt>
    <a name = "self._jump_pos"></a>
    <strong>self._jump_pos</strong>
    </dt>
    <dd>
    renoise.SongPos, disallow multiple playback_pos jumps







</dd>
    <dt>
    <a name = "self._first_pos"></a>
    <strong>self._first_pos</strong>
    </dt>
    <dd>
    renoise.SongPos, the first pressed button







</dd>
    <dt>
    <a name = "self._first_idx"></a>
    <strong>self._first_idx</strong>
    </dt>
    <dd>
    (int), the first pressed index







</dd>
    <dt>
    <a name = "self._second_pos"></a>
    <strong>self._second_pos</strong>
    </dt>
    <dd>
    renoise.SongPos, the second pressed button







</dd>
    <dt>
    <a name = "self._held_event_fired"></a>
    <strong>self._held_event_fired</strong>
    </dt>
    <dd>
    bool, true once the blockpos hold event has fired







</dd>
    <dt>
    <a name = "self._prev_block"></a>
    <strong>self._prev_block</strong>
    </dt>
    <dd>
    UIComponents







</dd>
</dl>


</div> <!-- id="content" -->
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.2</a></i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>
